Video colour component prediction method and apparatus, and computer storage medium

ABSTRACT

A video colour component prediction method and apparatus, and a computer storage medium are provided. The prediction method includes: obtaining a first colour component neighboring reference value and a first colour component reconstructed value corresponding to a current coding block, wherein the first colour component neighboring reference value represents a first colour component parameter corresponding to a neighboring reference sample of the current coding block, and the first colour component reconstructed value represents one or more reconstruction parameters of a first colour component corresponding to the current coding block; determining a weight coefficient corresponding to the neighboring reference sample; determining a scale factor according to the weight coefficient and the first colour component neighboring reference value; and obtaining a second colour component predicted value corresponding to the current coded block based on a linear model corresponding to the scale factor.

CROSS-REFERENCE TO RELATED APPLICATION

This is a continuation application of International Application No.PCT/CN2018/099703 filed on Aug. 9, 2018, the contents of which areincorporated herein by reference in its entirety.

TECHNICAL FIELD

Embodiments of the disclosure relate to intra prediction technologies inthe field of video coding, and more particularly to a method andapparatus for predicting a video colour component and a computer storagemedium.

BACKGROUND

In the next-generation video coding standard H.266 or Versatile VideoCoding (VCC), prediction from a luma value to a chroma value or betweenchroma values may be implemented by a color Cross-component Linear ModelPrediction (CCLM) method. Specifically, a linear regression method maybe used to construct a linear model for neighboring luma parameters andchroma parameters corresponding to a current coding block, and thus achroma predicted value may be calculated according to the linear modeland a reconstructed luma value.

However, when the linear model is constructed, not all factors areconsidered at present. For example, when the chroma value is predictedwith the luma value, such factors as neighboring reference luma valuesand neighboring reference chroma values are considered mostly; and whenthe prediction is performed between the chroma values, such factors asneighboring reference chroma components are considered mostly.Therefore, once the neighboring reference luma values are greatlydeviated from corresponding parameters of the current coding block, or,the neighboring reference chroma components are greatly deviated fromthe corresponding parameters of the current coding block, the calculatedlinear model has deviations from an expected model; and thus, theprediction accuracy of the chroma predicted value of the current codingblock is reduced, and the chroma predicted value is greatly deviatedfrom a real chroma value.

SUMMARY

In order to solve the above technical problems, the embodiments of thedisclosure provide a method and apparatus for predicting a video colourcomponent and a computer storage medium, which can improve predictionaccuracy of a second colour component predicted value effectively, andenable the second colour component predicted value to be closer to areal component value.

The technical solutions in the embodiments of the disclosure areimplemented as follows.

A method for predicting a video colour component may include thefollowing operations.

A first colour component neighboring reference value and a first colourcomponent reconstructed value corresponding to a current coding blockare acquired. The first colour component neighboring reference valuerepresents a first colour component parameter corresponding to aneighboring reference sample of the current coding block, and the firstcolour component reconstructed value represents one or morereconstructed parameters of the first colour component corresponding tothe current coding block.

A correlation coefficient is determined according to the first colourcomponent neighboring reference value and the first colour componentreconstructed value. The correlation coefficient represents a degree ofcolour component deviation between the current coding block and theneighboring reference sample.

A weight coefficient corresponding to the neighboring reference sampleis obtained by inputting the correlation coefficient to a preset weightcalculation model.

A scaling factor is determined according to the weight coefficient.

A second colour component predicted value corresponding to the currentcoding block is obtained based on the scaling factor.

According to the method and apparatus for predicting the video colourcomponent and the computer storage medium provided by the embodiments ofthe disclosure, the prediction apparatus acquires the correspondingfirst colour component neighboring reference values and first colourcomponent reconstructed value of the current coding block, the firstcolour component neighboring reference value representing the firstcolour component parameter corresponding to the neighboring referencesample of the current coding block, and the first colour componentreconstructed value representing one or more reconstructed parameters ofthe first colour component corresponding to the current coding block;determines the correlation coefficient according to the first colourcomponent neighboring reference value and the first colour componentreconstructed values the correlation coefficient representing a degreeof colour component deviation between the current coding block and theneighboring reference sample; obtains the corresponding weightcoefficient of the neighboring reference sample by inputting thecorrelation coefficient to a preset weight calculation model; determinesthe scaling factor according to the weight coefficient; and obtains thecorresponding second colour component predicted value of the currentcoding block based on the scaling factor. Therefore, in the embodimentsof the disclosure, the prediction apparatus may determine correlationcoefficients based on the corresponding first colour componentneighboring reference values and first colour component reconstructedvalues of the current coding block, thereby allocating different weightcoefficients to different neighboring reference samples according tocorrelations of component parameters between the neighboring referencesamples and the current coding block to construct a linear model that ismore suitable for the expected model, so as to effectively overcome thedefects that the linear model is deviated from the expected model whenthe first colour component neighboring reference values are greatlydeviated from corresponding component parameters of the current codingblock, or, the third colour component neighboring reference values aregreatly deviated from the corresponding component parameters of thecurrent coding block, and greatly improve the prediction accuracy of thevideo colour component predicted value when predicting components of thecurrent coding block according to the linear model, thereby making thevideo colour component predicted value closer to a real video colourcomponent value.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of a video coding process.

FIG. 2 is a schematic diagram of a video decoding process.

FIG. 3 is a first position schematic diagram for neighboring referencesampling.

FIG. 4 is a second position schematic diagram for neighboring referencesampling.

FIG. 5 is a first schematic diagram for determining a linear model inthe related art.

FIG. 6 is a second schematic diagram for determining a linear model inthe related art.

FIG. 7 is an implementation flowchart of a method for predicting a videocolour component provided by an embodiment of the disclosure.

FIG. 8 is a schematic diagram for removing an interference sample in anembodiment of the disclosure.

FIG. 9 is a first schematic structural diagram of a prediction apparatusprovided by an embodiment of the disclosure.

FIG. 10 is a second schematic structural diagram of a predictionapparatus provided by an embodiment of the disclosure.

DETAILED DESCRIPTION

The technical solutions in the embodiments of the disclosure will bedescribed below clearly and completely, in combination with theaccompanying drawings in the embodiments of the disclosure. It may beunderstood that the specific embodiments described herein are merelyused for explaining the relevant application, rather than limiting thedisclosure. In addition, it is further to be noted that, for the ease ofdescription, only the parts related to the relevant application areillustrated in the accompanying drawings.

In a video picture, a first colour component, a second colour componentand a third colour component are usually adopted to represent codingblocks. The first colour component, the second colour component and thethird colour component may include one luma component and two chromacomponents. Specifically, the luma component is usually represented by asign Y, and the chroma components are usually represented by signs Cband Cr. Cb is a blue chroma component and Cr is a red chroma component.

It is to be noted that, in the embodiments of the disclosure, the firstcolour component, the second colour component and the third colourcomponent may respectively be the luma component Y, the blue chromacomponent Cb, and the red chroma component Cr. For example, the firstcolour component may be the luma component Y, the second colourcomponent may be the red chroma component Cr, and the third colourcomponent may be the blue chroma component Cb, which are notspecifically defined in the embodiments of the disclosure.

Further, in the embodiments of the disclosure, the commonly-usedsampling format in which the luma component and the chroma component areseparately represented is also referred to as a YCbCr format. The YCbCrformat may include a 4:4:4 format, a 4:2:2 format and a 4:2:0 format.

Under the condition that the YCbCr 4:2:0 format is adopted for, if theluma component of the video picture is a coding block with a size of2N*2N, the corresponding chroma component is a coding block with a sizeof N*N, where N is a side length of the coding block. In the embodimentsof the disclosure, the following descriptions are made with the 4:2:0format as an example. However, the technical solutions of theembodiments of the disclosure are also applied to other samplingformats.

In the embodiments of the disclosure, the method for predicting a videocolour component may be applied to the intra prediction section in avideo coding hybrid framework. Specifically, the method for predictingthe video colour component may be available to both a coding terminaland a decoding terminal at the same time. For example, FIG. 1 is aschematic diagram of a video coding process. As illustrated in FIG. 1,the video coding may include multiple specific steps such as intraestimation, intra prediction and motion compensation, and the method forpredicting a video colour component provided by the disclosure may beapplied to the intra prediction section. FIG. 2 is a schematic diagramof a video decoding process. As illustrated in FIG. 2, the videodecoding may include multiple specific steps such as filtering, intraprediction and motion compensation, and the method for predicting avideo colour component provided by the disclosure may be applied to theintra prediction section.

In H.266, for further improving the coding performance and codingefficiency, Cross-Component Prediction (CCP) is extended and improved,and Cross-Component Linear Model Prediction (CCLM) is proposed. InH.266, CCLM implements prediction from the first colour component to thesecond colour component, from the first colour component to the thirdcolour component and between the second colour component and the thirdcolour component. The following descriptions are made with predictionfrom the first colour component to the second colour component as anexample, but the technical solutions of the embodiments of thedisclosure may also be applied to prediction of other colour components.

Specifically, in the related art, when the prediction from the lumacomponent to the chroma component is implemented by the CCLM method, across-component linear model prediction mode is used in a decoder of thenext-generation video coding standard such as an H.266/VVC early testmodel (Joint Exploration Model, JEM) or VVC test model (VTM) in order toreduce redundancy between the luma component and the chroma component aswell as between different chroma components. For example, according tothe formula (1), a reconstructed luma value of the same coding block isused to construct a predicted value of the chroma:Pred_(C)[i,j]=α·Rec _(L)[i,j]+β  (1)

i, j represents a position coordinate of a sampling point in the codingblock, i represents a horizontal direction and j represents a verticaldirection, Pred_(C)[i, j] represents a second colour component predictedvalue of a sampling point with a position coordinate [i, j] in thecoding block, Rec_(L)[i, j] represents a first colour componentreconstructed value of the sampling point with the position coordinatein the same coding block (after down-sampling). α and β are scalingfactors of a linear model and may be deduced by minimizing regressionerrors of first colour component neighboring reference values and secondcolour component neighboring reference values, as illustrated in thefollowing formula (2):

$\begin{matrix}\left\{ \begin{matrix}{\alpha = \frac{{N \cdot {\Sigma\left( {{L(n)} \cdot {C(n)}} \right)}} - {\Sigma\;{{L(n)} \cdot \Sigma}\;{C(n)}}}{{N \cdot {\Sigma\left( {{L(n)} \cdot {L(n)}} \right)}} - {\Sigma\;{{L(n)} \cdot {\sum{L(n)}}}}}} \\{\beta = \frac{{\sum{C(n)}} - {\alpha \cdot {\sum{L(n)}}}}{N}}\end{matrix} \right. & (2)\end{matrix}$

L(n) represents a first colour component neighboring reference value(for example, on the left side and the upper side) after down-sampling,C(n) represents a second colour component neighboring reference value(for example, on the left side and the upper side), and N is the numberof second colour component neighboring reference values. FIG. 3 is afirst position schematic diagram for neighboring reference sampling, andFIG. 4 is a second position schematic diagram for neighboring referencesampling. As illustrated in FIG. 3 and FIG. 4, L(n) and C(n) areneighboring reference pixel points, and N is the number of second colourcomponent neighboring reference values. With regard to the video pictureof the 4:2:0 format, the first colour component coding block has thesize of 2N*2N, as illustrated in FIG. 3, and the corresponding secondcolour component has the size of N*N, as illustrated in FIG. 4. The twoequations may be directly applied to the square coding block. Withregard to a non-square coding block, the neighboring sampling of thelong side is first subjected to down-sampling to obtain the samplingnumber equal to that of the short side. Both α and β are nottransmitted, but calculated through the formula (2) in the decoder,which is not specifically defined in the embodiments of the disclosure.

FIG. 5 is a first schematic diagram for determining a linear model inthe related art. As illustrated in FIG. 5, a, b and c are first colourcomponent neighboring reference values, A, B and C are the second colourcomponent neighboring reference values, e is the first colour componentreconstructed value of the current coding block, and E is the secondcolour component predicted value of the current coding block. α and βmay be calculated according to the formula (2) by using all first colourcomponent neighboring reference values L(n) and second colour componentneighboring reference values C(n) of the current coding block. Then, thefirst colour component reconstructed value e of the current coding blockis substituted into the linear model of the formula (1) to calculate thesecond colour component predicted value E of the current coding block.

Specifically, in the related art, in addition to the method forpredicting the chroma component with the luma component, i.e., themethod for predicting the second colour component with the first colourcomponent, or predicting the third colour component with the firstcolour component, the CCLM prediction mode further includes predictionbetween two chroma components, i.e., the method for prediction betweenthe second colour component and the third colour component. In theembodiments of the disclosure, not only may the Cr component bepredicted from the Cb component, but the Cb component may also bepredicted from the Cr component.

It is to be noted that, in the embodiments of the disclosure, theprediction between the chroma components in CCLM, i.e., the predictionbetween the second colour component and the third colour component maybe applied to a residual domain. With prediction of the Cr component asan example, the Cb residual may be used to predict the Cr residual. Thefinal predicted value of the Cr component is obtained by adding areconstructed Cb residual having a weight to a conventional intrapredicted value of the Cr component, as illustrated in a formula (3):Pred*_(Cr)[i,j]=γ·resi_(Cb)′[i,j]+Pred_(Cr)[i,j]  (3)

Where pred_(Cr)*[i, j] represents the final predicted value of the Crcomponent of the sampling point with the position coordinate [i, j] inthe current coding block, and resi_(Cb)′(i, j) is a predicted residualof the reconstructed Cb component. The calculation of the scaling factorγ is the same as calculation of the predicted model parameter from theluma component to the chroma component in CCLM, and only difference isto increase a regression cost relevant to the default value γ in anerror function, such that the obtained scaling factor γ is biased to thedefault value of −0.5. Specifically, the scaling factor γ may becalculated according to the formula (4):

$\begin{matrix}{\gamma = \frac{{N \cdot {\sum\left( {{{Cb}(n)} \cdot {{Cr}(n)}} \right)}} - {\sum{{{Cb}(n)} \cdot {\sum{{Cr}(n)}}}} + {\lambda \cdot \left( {- 0.5} \right)}}{{N \cdot {\sum\left( {{{Cb}(n)} \cdot {{Cb}(n)}} \right)}} - {\sum{{{Cb}(n)} \cdot {\sum{{Cb}(n)}}}} + \lambda}} & (4)\end{matrix}$

Where Cb(n) represents a neighboring reference Cb value of the currentcoding block, Cr(n) represents a neighboring reference Cr value of thecurrent coding block, and λ may be an empirical value, for example,λ=Σ(Cb(n).Cb(n))>>9.

However, in the related art, when the second colour component or thethird colour component is predicted according to the first colourcomponent to calculate the linear model, only the first colour componentneighboring reference values, the second colour component neighboringreference values or the third colour component neighboring referencevalues may be considered. For example, as illustrated in FIG. 5, allfirst colour component neighboring reference values L(n) and all secondcolour component neighboring reference values C(n) that are adjacent areused to calculate the scaling factors α and β. Then, the first colourcomponent reconstructed values of the current coding block aresubstituted into the linear model to obtain second colour componentpredicted values of the current coding block. During this process, thecorrelation between the first colour component reconstructed value andthe first colour component neighboring reference value of the currentcoding block is not considered. If the first colour componentneighboring reference values deviated more from the present luma valueare used to construct the linear model, the second colour componentpredicted value or third colour component predicted value of the currentcoding block may be far deviated from the actual colour component valueto reduce the prediction accuracy. For example, FIG. 6 is a secondschematic diagram for determining a linear model in the related art. Asillustrated in FIG. 6, the pixel points b and c are deviated from thereconstructed luma value of the current coding block, and correspondenceof the pixel points b and c with corresponding chroma values thereof aredeviated from a linear relationship between the reconstructed luma valueand the corresponding chroma value of the current coding block.According to calculation methods in the related art, the two pixelpoints b and c are also used as parameters to calculate the linearmodel, which results in that the deduced linear model is deviated fromthe expected linear model.

In the embodiments of the disclosure, the method for predicting a videocolour component provides a scheme for calculating the linear modelbased on component correlation. Specifically, when one or more scalingfactors of the linear model are calculation, not only the first colourcomponent neighboring reference values, the second colour componentneighboring reference values or the third colour component neighboringreference values but also the correlations and similarities between thefirst colour component reconstructed values and the first colourcomponent neighboring reference values of the current coding block areconsidered; and then, the neighboring reference pixel samples areweighted or screened according to the similarities. Therefore,parameters of the linear model are closer to the present first colourcomponent reconstructed values, which further makes the second colourcomponent predicted value or the third colour component predicted valueof the current coding block more accurate.

The technical solutions in the embodiments of the disclosure aredescribed below clearly and completely in combination with theaccompanying drawings in the embodiments of the disclosure. In thefollowing embodiments of the disclosure, the first colour component maybe the luma component Y, the second colour component may be the redchroma component Cr, and the third colour component may be the bluechroma component Cb, which are not specifically defined in theembodiments of the disclosure.

Embodiment 1

The embodiment of the disclosure provides a method for predicting avideo colour component. FIG. 7 is an implementation flowchart of amethod for predicting a video colour component provided by an embodimentof the disclosure. As illustrated in FIG. 7, in the embodiment of thedisclosure, the method for predicting the video colour component by theprediction apparatus may include the following operations.

In 101, a first colour component neighboring reference value and a firstcolour component reconstructed value corresponding to a current codingblock are acquired, the first colour component neighboring referencevalue representing a first colour component parameter corresponding to aneighboring reference sample of the current coding block, and the firstcolour component reconstructed value representing one or morereconstructed parameters of the first colour component corresponding tothe current coding block.

In the embodiment of the disclosure, the prediction apparatus may firstacquire the corresponding first colour component neighboring referencevalue and first colour component reconstructed value of the currentcoding block. It is to be noted that, in the embodiment of thedisclosure, the current coding block is a coding block divided by theprediction apparatus and including at least one pixel point.

It is to be noted that, in the embodiment of the disclosure, the firstcolour component neighboring reference value is used to represent thefirst colour component parameter corresponding to the neighboringreference sample of the current coding block. With regard to thedown-sampling manner, when the current coding block includes one pixelpoint, the corresponding neighboring reference samples may be one pixelpoint on the upper side and one pixel point on the left side of thepixel point. When the current coding block includes multiple pixelpoints, the corresponding neighboring reference samples may be multiplepixel points on the upper sides and the left sides of the multiple pixelpoints.

Further, in the embodiment of the disclosure, the neighboring referencesamples are pixel points adjacent to the current coding block.Specifically, in the embodiment of the disclosure, for the down-samplingmanner, the neighboring reference samples may be neighboring pixelpoints located on the left side and the upper side of the current codingblock.

It is to be noted that, in the embodiment of the disclosure, whenacquiring the first colour component neighboring reference values, theprediction apparatus may acquire all first colour component neighboringreference values corresponding to the neighboring reference samples.Specifically, in the embodiment of the disclosure, one neighboringreference sample corresponds to one first colour component neighboringreference value, i.e., when the neighboring reference samples aremultiple pixel points, the prediction apparatus may acquire multiplefirst colour component neighboring reference values corresponding to themultiple pixel points.

Further, in the embodiment of the disclosure, the first colour componentreconstructed value is used to represent one or more reconstructedparameters of the first colour component corresponding to the currentcoding block. Specifically, in the embodiment of the disclosure, whenthe current coding block includes one pixel point, there is onereconstructed parameter of the corresponding first colour component; andwhen the current coding block includes multiple pixel points, there aremultiple reconstructed parameters of the corresponding first colourcomponent.

It is to be noted that, in the embodiment of the disclosure, whenacquiring the first colour component reconstructed value, the predictionapparatus may acquire all first colour component reconstructed valuescorresponding to the current coding block. Specifically, in theembodiment of the disclosure, one pixel point in the current codingblock corresponds to one first colour component reconstructed value.

In 102, a correlation coefficient is determined according to the firstcolour component neighboring reference value and the first colourcomponent reconstructed value, the correlation coefficient representinga degree of colour component deviation between the current coding blockand the neighboring reference sample.

In the embodiment of the disclosure, after acquiring the first colourcomponent neighboring reference value and first colour componentreconstructed value corresponding to the current coding block, theprediction apparatus may further determine the correlation coefficientaccording to the first colour component neighboring reference value andthe first colour component reconstructed value.

It is to be noted that, in the embodiment of the disclosure, thecorrelation coefficient may be used to represent the degree of colourcomponent deviation between the current coding block and the neighboringreference sample. Specifically, the correlation coefficient may beconfigured to represent the correlation between the first colourcomponent reconstructed value corresponding to the current coding blockand the first colour component neighboring reference value correspondingto the neighboring reference sample.

Further, in the embodiment of the disclosure, when determining thecorrelation coefficient according to the first colour componentneighboring reference value and the first colour component reconstructedvalue, the prediction apparatus may perform difference calculation onthe first colour component neighboring reference value and the firstcolour component reconstructed value, and further determine thecorrelation coefficient according to the difference result. Meanwhile,when determining the correlation coefficient according to the firstcolour component neighboring reference value and the first colourcomponent reconstructed value, the prediction apparatus may performmatrix multiplication on a matrix corresponding to the first colourcomponent neighboring reference values and a matrix corresponding to thefirst colour component reconstructed values, and further determine thecorrelation coefficients according to multiplication results.

In 103, a weight coefficient corresponding to the neighboring referencesample is obtained by inputting the correlation coefficient to a presetweight calculation model.

In the embodiment of the disclosure, after determining the correlationcoefficient according to the first colour component neighboringreference value and the first colour component reconstructed value, theprediction apparatus may input the correlation coefficient to a presetweight calculation model, so as to obtain the corresponding weightcoefficient of the neighboring reference sample.

It is to be noted that, in the embodiment of the disclosure, the presetweight calculation model is a calculation model preset by the predictionapparatus and configured to allocate weights according to thecorrelation coefficients.

Further, in the embodiment of the disclosure, the weight coefficientsmay be weight values calculated according to the correlations betweenthe neighboring reference samples and the current coding block when asecond colour component predicted value corresponding to the currentcoding block is predicted.

It is to be noted that, in the embodiment of the disclosure, the higherthe correction between one reference sample in the neighboring referencesamples and the current coding block, the larger the weight valuecorresponding to the one reference sample.

It is to be noted that, in the embodiment of the disclosure, when thesecond colour component predicted value is calculated, any of theneighboring reference samples has a corresponding weight coefficient.

Further, in the embodiment of the disclosure, when determining theweight coefficients, the prediction apparatus may perform calculationthrough the preset weight calculation model. Specifically, in theembodiment of the disclosure, the weight calculation model isillustrated in the following formula (5):

$\begin{matrix}{{w(n)} = e^{- \frac{{({m\; i\;{n{({{L{(n)}} - {{Rec}_{L}{\lbrack{i,j}\rbrack}}})}}})}^{2}}{2 \cdot \sigma^{2}}}} & (5)\end{matrix}$

Where, L(n) represents a first colour component neighboring referencevalue of the left side and the upper side during down-sampling,Rec_(L)(i, j) is a current first colour component reconstructed value,and a is a value relevant to a quantization parameter during coding.

In 104, a scaling factor is determined according to the weightcoefficient.

In the embodiment of the disclosure, after inputting the correlationcoefficient to the preset weight calculation model to obtain thecorresponding weight coefficient of the neighboring reference sample,the prediction apparatus may determine the scaling factor according tothe weight coefficient.

It is to be noted that, in the embodiment of the disclosure, the scalingfactor may be a coefficients in the linear model that is obtained whenthe prediction apparatus predicts the video colour component.

Further, in the embodiment of the disclosure, the scaling factors fordifferent prediction modes are different coefficients. For example, whenthe prediction apparatus predicts the second colour component or thethird colour component through the first colour component, the scalingfactors may be α and β in the formula (1); and when the predictionapparatus performs the prediction between the second colour componentand the third colour component, the scaling factor may be γ in theformula (3).

In 105, a second colour component predicted value corresponding to thecurrent coding block is obtained based on the scaling factor.

In the embodiment of the disclosure, after determining the scalingfactor according to the weight coefficient, the prediction apparatus mayfurther obtain the corresponding second colour component predicted valueof the current coding block based on the scaling factor. The secondcolour component predicted value is a predicted result obtained when theprediction apparatus performs prediction on the second component of thecurrent coding block.

It is to be noted that, in the embodiment of the disclosure, whenobtaining the second colour component predicted value according to thescaling factor, the prediction apparatus may first establish a linearmodel for predicting the video colour component according to the scalingfactor.

Further, in the embodiment of the disclosure, for different predictionmodes, the linear model established by the prediction apparatus is alsodifferent, i.e., the linear model established in the prediction of thesecond colour component or the third colour component with the firstcolour component is different from that established in the predictionbetween the second colour component and the third colour component.

It is to be noted that, in the embodiment of the disclosure, the secondcolour component predicted value obtained during predicting the secondcolour component or the third colour component with the first colourcomponent is the second colour component or third colour componentcorresponding to the current coding block, i.e., Cb component or Crcomponent; and the second colour component predicted value obtained inthe prediction between the second colour component and the third colourcomponent is the second colour component or third colour componentcorresponding to the current coding block, i.e., Cb component or Crcomponent.

Further, in the embodiment of the disclosure, after establishing thelinear model according to the scaling factor, the prediction apparatusmay predict the video colour component of the current coding blockaccording to the linear model, to obtain the second colour componentprediction value.

Further, in the embodiment of the disclosure, there are two CCLMprediction modes, one being a single model CCLM prediction mode, and theother being a Multiple Model CCLM (MMLM) prediction mode and also calledthe MMLM prediction mode. As its name implies, the single model CCLMprediction mode is to predict the second colour component or the thirdcolour component from the first colour component only with one linearmodel, and the MMLM prediction mode is to predict the second colourcomponent or the third colour component from the first colour componentwith multiple linear models. For example, in the MMLM prediction mode,the first colour component neighboring reference values and the secondcolour component neighboring reference values of the current codingblock are divided into two groups, and each group may independentlyserve as a training set to deduce parameters of the linear model, i.e.,each group can deduce a group of scaling factors. Therefore, the methodfor predicting a video colour component provided by the embodiment ofthe disclosure may also be applied to the MMLM prediction mode, and mayalso overcome the defects that the linear model is deviated from theexpected model when the first colour component neighboring referencevalues are greatly deviated from corresponding component parameters ofthe current coding block, or, the third colour component neighboringreference values are greatly deviated from the corresponding componentparameters of the current coding block, thereby greatly improving theprediction accuracy of the second colour component predicted value whenthe second colour component of the current coding block is predictedaccording to the linear model.

In the embodiment of the disclosure, the prediction apparatus maydetermine correlation coefficients based on the first colour componentneighboring reference values and first colour component reconstructedvalues corresponding to the current coding block, thereby allocatingdifferent weight coefficients to different neighboring reference samplesaccording to correlations of component parameters between theneighboring reference samples and the current coding block to constructa linear model that is more suitable for the expected model, so as toeffectively overcome the defects that the linear model is deviated fromthe expected model when the first colour component neighboring referencevalues are greatly deviated from corresponding component parameters ofthe current coding block, or, the third colour component neighboringreference values are greatly deviated from the corresponding componentparameters of the current coding block, and greatly improve theprediction accuracy of the video colour component predicted value whenpredicting components of the current coding block according to thelinear model, thereby making the video colour component predicted valuecloser to a real video colour component value.

Embodiment 2

Based on Embodiment 1, in the embodiment of the disclosure, the methodthat the prediction apparatus determines the correlation coefficientaccording to the first colour component neighboring reference value andthe first colour component reconstructed value may include the followingoperations.

In 102 a, difference calculation is performed between any referencevalue in first colour component neighboring reference values and eachfirst colour component reconstructed value to obtain componentdifferences corresponding to the any reference value. One first colourcomponent neighboring reference value and one first colour componentreconstructed value corresponding to one difference.

In the embodiment of the disclosure, after acquiring the first colourcomponent neighboring reference values and first colour componentreconstructed values corresponding to the current coding block, theprediction apparatus may respectively perform difference calculationbetween any reference value in the first colour component neighboringreference values and each first colour component reconstructed value toobtain the component differences corresponding to the any referencevalue.

It is to be noted that, in the embodiment of the disclosure, one of thefirst colour component neighboring reference values and one of the firstcolour component reconstructed values correspond to one difference.

Further, in the embodiment of the disclosure, the prediction apparatusrespectively performs the difference calculation between any referencevalue in the first colour component neighboring reference values andeach first colour component reconstructed value, which may representdegrees of video colour component correlation between the neighboringreference samples and the current coding block.

In the embodiment of the disclosure, it may be considered that thecorrelation between the neighboring reference sample and the currentcoding block is lower as the component difference is greater.

In 102 b, a minimum difference in component differences is determined asthe correlation coefficient.

In the embodiment of the disclosure, after performing the differencecalculation between any reference value in the first colour componentneighboring reference values and each first colour componentreconstructed value to obtain the component differences corresponding tothe any reference value, the prediction apparatus may determine aminimum difference in the component differences as the correlationcoefficient.

It is to be noted that, in the embodiment of the disclosure, afterdetermining the minimum difference from the component differences, theprediction apparatus may determine the correlation coefficient accordingto the minimum difference.

Further, in the embodiment of the disclosure, it may be considered thatthe correlation between the neighboring reference sample and the currentcoding block is higher as the component difference is smaller. Thus, theprediction apparatus may determine the correlation factor according tothe minimum difference in the component differences.

Further, in the embodiment of the disclosure, after the predictionapparatus respectively performs the difference calculation between anyreference value in the first colour component neighboring referencevalues and each first colour component reconstructed value to obtain thecomponent differences corresponding to the any reference value andbefore the prediction apparatus determines the scaling factor accordingto the weight coefficient, the method that the prediction apparatuspredicts a video colour component may further include the followingoperation.

In 106, when the component differences corresponding to the anyreference value are greater than a preset difference threshold, a weightcoefficient of the neighboring reference sample corresponding to the anyreference value is set as zero.

In the embodiment of the disclosure, after the prediction apparatusrespectively performs the difference calculation between any referencevalue in the first colour component neighboring reference values andeach first colour component reconstructed value to obtain the componentdifferences corresponding to the any reference value and before theprediction apparatus determines the scaling factor according to theweight coefficient, if the component differences corresponding to theany reference value are greater than the preset difference threshold,the prediction apparatus may set the weight coefficient of theneighboring reference sample corresponding to the any reference value aszero.

It is to be noted that, in the embodiment of the disclosure, afterobtaining the component differences corresponding to the any referencevalue, the prediction apparatus may compare the component differenceswith the preset difference threshold. If all component differencescorresponding to the any reference value are greater than the presetdifference threshold, it may be considered that the any first colourcomponent neighboring reference value has a large deviation from thecurrent coding block. Therefore, the prediction apparatus may remove theneighboring reference sample corresponding to the any first colourcomponent neighboring reference value, i.e., sets the weight coefficientof the neighboring reference sample corresponding to the any referencevalue as zero.

Further, in the embodiment of the disclosure, before the predictionapparatus calculates the linear model, correlations between the firstcolour component reconstructed values and the first colour componentneighboring reference values of the current coding block may beconsidered, i.e., the first colour component neighboring referencevalues are screened according to the differences between the firstcolour component neighboring reference values and the first colourcomponent reconstructed values.

Further, in the embodiment of the disclosure, the prediction apparatusmay preset a threshold, i.e., the preset difference threshold, thentraverse each reference value in the first colour component neighboringreference values to obtain the differences with each first colourcomponent reconstructed value of the current coding block. If theminimum value of differences between one of the first colour componentneighboring reference values and each first colour componentreconstructed value is greater than the preset difference threshold, theprediction apparatus may consider that the neighboring reference sampleis an interference sample for accurate calculation of the linear modeland may remove the interference sample from the training samples of thelinear model, such that the first colour component neighboring referencevalues from which the interference sample is removed may be taken as thetraining samples of the linear model to calculate model parameters.

In the embodiment of the disclosure, FIG. 8 is a schematic diagram forremoving an interference sample in an embodiment of the disclosure. Asillustrated in FIG. 8, if a first colour component value in the firstcolour component neighboring reference values of the current codingblock is deviated from the first colour component reconstructed valuesof the current coding block, when the linear model is calculated, thissample is removed and is not taken as a training sample of the linearmodel. In such case, the calculated linear model is more accurate.

In the embodiments of the disclosure, the prediction apparatus maydetermine the correlation coefficients based on the first colourcomponent neighboring reference values and first colour componentreconstructed values corresponding to the current coding block, therebyallocating different weight coefficients to different neighboringreference samples according to correlations of component parametersbetween the neighboring reference samples and the current coding blockto construct a linear model that is more suitable for the expectedmodel, so as to effectively overcome the defects that the linear modelis deviated from the expected model when the first colour componentneighboring reference values are greatly deviated from correspondingcomponent parameters of the current coding block, or, the third colourcomponent neighboring reference values are greatly deviated from thecorresponding component parameters of the current coding block, andgreatly improve the prediction accuracy of the video colour componentpredicted value when predicting components of the current coding blockaccording to the linear model, thereby making the video colour componentpredicted value closer to a real video colour component value.

Embodiment 3

Based on Embodiment 1, in the embodiment of the disclosure, before theprediction apparatus determines the scaling factor according to theweight coefficients, i.e., the operation in 104, the method that theprediction apparatus predicts the video colour component may furtherinclude the following operation.

In 107, a second colour component neighboring reference valuecorresponding to the current coding block is acquired. The second colourcomponent neighboring reference value is a second component parametercorresponding to the neighboring reference sample and different from thefirst colour component parameter.

In the embodiment of the disclosure, before determining the scalingfactor according to the weight coefficient, the prediction apparatus mayfirst acquire the second colour component neighboring reference valuecorresponding to the current coding block.

It is to be noted that, in the embodiment of the disclosure, the secondcolour component neighboring reference value is a second componentparameter corresponding to the neighboring reference sample anddifferent from the first colour component parameter.

In the embodiment of the disclosure, the scaling factor includes a firstscaling parameter and a second scaling parameter, and the method thatthe prediction apparatus determines the scaling factor according to theweight coefficient may include the following operations.

In 104 a, the weight coefficient, the first colour component neighboringreference value and the second colour component neighboring referencevalue are input to a first preset factor calculation model to obtain thefirst scaling parameter.

In the embodiment of the disclosure, after inputting the correlationcoefficient to the preset weight calculation model to obtain the weightcoefficient corresponding to the first colour component neighboringreference value, the prediction apparatus may input the weightcoefficient, the first colour component neighboring reference value andthe second colour component neighboring reference value to the firstpreset factor calculation model and obtain the first scaling parameter.

It is to be noted that, in the embodiment of the disclosure, if thepreset apparatus predicts the second colour component with the firstcolour component, the scaling factor may include the first scalingparameter and the second scaling parameter. The first scaling parameterand the second scaling parameter are configured to construct the secondcolour component predicted values according to the first colourcomponent reconstructed values.

Further, in the embodiment of the disclosure, if the predictionapparatus further determines calculation of the first scaling parameteraccording to the first colour component neighboring reference values andthe second colour component neighboring reference values, the firstpreset factor calculation model may be used, as illustrated in thefollowing formula (6):

$\begin{matrix}{\alpha = \frac{\begin{matrix}{{\sum{{w(n)} \cdot {\sum\left( {{w(n)} \cdot {L(n)} \cdot {C(n)}} \right)}}} -} \\{\sum{\left( {{w(n)} \cdot {L(n)}} \right) \cdot {\sum\left( {{w(n)} \cdot {C(n)}} \right)}}}\end{matrix}}{{\sum{{w(n)} \cdot {\sum\left( {{w(n)} \cdot {L(n)} \cdot {L(n)}} \right)}}} - {\sum{\left( {{w(n)} \cdot {L(n)}} \right) \cdot {\sum\left( {{w(n)} \cdot {L(n)}} \right)}}}}} & (6)\end{matrix}$

Where, α is the first scaling parameter, L(n) represents a first colourcomponent neighboring reference value on the left side and the upperside during down-sampling, C(n) represents a second colour componentneighboring reference value on the left side and the upper side, andw(n) is a weight coefficient corresponding to each first colourcomponent neighboring reference value.

In 104 b, the weight coefficient, the first scaling parameter, the firstcolour component neighboring reference value and the second colourcomponent neighboring reference value are input to a second presetfactor calculation model to obtain the second scaling parameter.

In the embodiment of the disclosure, after inputting the weightcoefficient, the first colour component neighboring reference value andthe second colour component neighboring reference value to the firstpreset factor calculation model to obtain the first scaling parameter,the prediction apparatus may continue to input the weight coefficient,the first scaling parameter, the first colour component neighboringreference value and the second colour component neighboring referencevalue to the second preset factor calculation model to obtain the secondscaling parameter.

Further, in the embodiment of the disclosure, if the predictionapparatus further determines calculation of the second scaling parameteraccording to the first colour component neighboring reference value andthe second colour component neighboring reference value, the secondpreset factor calculation model may be used, as illustrated in thefollowing formula (7):

$\begin{matrix}{\beta = \frac{{\sum\left( {{w(n)} \cdot {C(n)}} \right)} - {\alpha \cdot {\sum\left( {{w(n)} \cdot {L(n)}} \right)}}}{\sum{w(n)}}} & (7)\end{matrix}$

Where, β is the second scaling parameter, L(n) represents a first colourcomponent neighboring reference value on the left side and the upperside during down-sampling, C(n) represents a second colour componentneighboring reference value on the left side and the upper side, andw(n) is a weight coefficient corresponding to each neighboring referencesample.

In the embodiment of the disclosure, before the prediction apparatusdetermines the scaling factor according to the weight coefficient, i.e.,the operation in 104, the method that the prediction apparatus predictsa video colour component may further include the following operation.

In 108, a second colour component neighboring reference value and athird colour component neighboring reference value corresponding to thecurrent coding block are acquired. The second colour componentneighboring reference value and the third colour component neighboringreference value respectively represent a second colour componentparameter and a third colour component parameter of the neighboringreference sample.

In the embodiment of the disclosure, before determining the scalingfactor according to the weight coefficient, the prediction apparatus mayfirst acquire the second colour component neighboring reference valueand third colour component neighboring reference value corresponding tothe current coding block.

It is to be noted that, in the embodiment of the disclosure, the secondcolour component neighboring reference value and the third colourcomponent neighboring reference value respectively represent the secondcolour component parameter and the third colour component parameter ofthe neighboring reference sample. Specifically, the third colourcomponent neighboring reference value and the second colour componentneighboring reference value may be used to perform prediction betweenthe same components.

Further, in the embodiment of the disclosure, the third colour componentneighboring reference value and the second colour component neighboringreference value may respectively be neighboring reference Cb value andneighboring reference Cr value corresponding to the neighboringreference sample.

In the embodiment of the disclosure, before the prediction apparatusobtains the second colour component predicted value corresponding to thecurrent coding block based on the scaling factor, i.e., the operation in105, the method that the prediction apparatus predicts a video colourcomponent may further include the following operation.

In 109, a second colour component estimated value and a third colourcomponent reconstructed residual corresponding to the current codingblock are acquired.

In the embodiment of the disclosure, before obtaining the second colourcomponent predicted value corresponding to the current coding blockaccording to the scaling factor, the prediction apparatus may firstacquire the second colour component estimated value and third colourcomponent reconstructed residual corresponding to the current codingblock.

It is to be noted that, in the embodiment of the disclosure, the secondcolour component estimated value is obtained by performing conventionalcomponent prediction on the second colour component corresponding to thecurrent coding block, and the third colour component reconstructedresidual is configured to represent a predicted residual of the thirdcolour component corresponding to the current coding block.

In the embodiment of the disclosure, the scaling factor includes a thirdscaling parameter, and the method that the prediction apparatusdetermines the scaling factor according to the weight coefficient mayinclude the following operations.

In 104 c, the weight coefficient, the third colour component neighboringreference value and the second colour component neighboring referencevalue are input to a third preset factor calculation model to obtain thethird scaling parameter.

In the embodiment of the disclosure, after inputting the correlationcoefficient to the preset weight calculation model to obtain the weightcoefficient corresponding to the neighboring reference sample, theprediction apparatus may input the weight coefficient, the third colourcomponent neighboring reference value and the second colour componentneighboring reference value to the third preset factor calculation modelto obtain the third scaling parameter.

It is to be noted that, in the embodiment of the disclosure, if theprediction apparatus performs prediction between the second colourcomponent and the third colour component, the scaling factor may includethe third scaling parameter.

Further, in the embodiment of the disclosure, if the predictionapparatus further determines calculation of the third scaling parameteraccording to the third colour component neighboring reference value andthe second colour component neighboring reference value, the thirdpreset factor calculation model may be used, as illustrated in thefollowing formula (8):

$\begin{matrix}{\gamma = \frac{\begin{matrix}{{\sum{{w(n)} \cdot {\sum{\cdot \left( {{w(n)} \cdot {{Cb}(n)} \cdot {{Cr}(n)}} \right)}}}} -} \\{{\sum{\left( {{w(n)} \cdot {{Cb}(n)}} \right) \cdot {\sum\left( {{w(n)} \cdot {{Cr}(n)}} \right)}}} + {\lambda \cdot \left( {- 0.5} \right)}}\end{matrix}}{\begin{matrix}{{\sum{{w(n)} \cdot {\sum\left( {{w(n)} \cdot {{Cb}(n)} \cdot {{Cb}(n)}} \right)}}} -} \\{{\sum{\left( {{w(n)} \cdot {{Cb}(n)}} \right) \cdot {\sum\left( {{w(n)} \cdot {{Cb}(n)}} \right)}}} + \lambda}\end{matrix}}} & (8)\end{matrix}$

Where, γ is the third scaling parameter, Cb(n) represents a neighboringreference Cb value of the current coding block, i.e., the third colourcomponent neighboring reference value, Cr(n) represents a neighboringreference Cr value of the current coding block, i.e., the second colourcomponent neighboring reference value, λ may be an empirical value, andw(n) is a weight coefficient corresponding to each neighboring referencesample.

In the embodiments of the disclosure, the prediction apparatus maydetermine the correlation coefficients based on the first colourcomponent neighboring reference values and first colour componentreconstructed values corresponding to the current coding block, therebyallocating different weight coefficients to different neighboringreference samples according to correlations of component parametersbetween the neighboring reference samples and the current coding blockto construct a linear model that is more suitable for the expectedmodel, so as to effectively overcome the defects that the linear modelis deviated from the expected model when the first colour componentneighboring reference values are greatly deviated from correspondingcomponent parameters of the current coding block, or, the third colourcomponent neighboring reference values are greatly deviated from thecorresponding component parameters of the current coding block, andgreatly improve the prediction accuracy of the video colour componentpredicted value when predicting components of the current coding blockaccording to the linear model, thereby making the video colour componentpredicted value closer to a real video colour component value.

Embodiment 4

Based on Embodiment 3, in the embodiment of the disclosure, the methodthat the prediction apparatus obtains the second colour componentpredicted value corresponding to the current coding block based on thescaling factor may include the following operation.

In 105 a, the second colour component predicted value is obtainedaccording to the first scaling parameter, the second scaling parameterand the first colour component reconstructed value.

In the embodiment of the disclosure, after determining the scalingfactor according to the weight coefficient, the prediction apparatus mayfurther obtain the second colour component predicted value according tothe first colour component reconstructed value and the scaling factorincluding the first scaling parameter and the second scaling parameter.

It is to be noted that, in the embodiment of the disclosure, afterobtaining the scaling factor including the first scaling parameter andthe second scaling parameter, the prediction apparatus may establish,according to the first scaling parameter, the second scaling parameterand the first colour component reconstructed values, a linear model forpredicting the video colour component, such that the second colourcomponent of the current coding block may be constructed according tothe linear model to obtain the second colour component predicted values.

Further, in the embodiment of the disclosure, the prediction apparatusmay determine the second colour component predicted values according tothe formula (1), i.e., the prediction apparatus may calculate the secondcolour component predicted values according to the first scalingparameter, the second scaling parameter and the first colour componentreconstructed values.

In the embodiment of the disclosure, the method that the predictionapparatus obtains the second colour component predicted valuecorresponding to the current coding block based on the scaling factormay further include the following operations.

In 105 b, the second colour component predicted value is obtainedaccording to the third scaling parameter, the second colour componentestimated value and the third colour component reconstructed residual.

In the embodiment of the disclosure, after determining the scalingfactor according to the weight coefficient, the prediction apparatus mayfurther obtain the second colour component predicted value according tothe scaling factor including the third scaling parameter, the secondcolour component estimated value and the third colour componentreconstructed residual.

It is to be noted that, in the embodiment of the disclosure, afterobtaining the scaling factor including the third scaling parameter, theprediction apparatus may establish, according to the third scalingparameter, the second colour component estimated values and the thirdcolour component reconstructed residuals, a linear model for predictingthe video colour component, such that the second colour component of thecurrent coding block may be constructed according to the linear model toobtain the second colour component predicted values.

Further, in the embodiment of the disclosure, the prediction apparatusmay determine the second colour component predicted values through theformula (3), i.e., the prediction apparatus may calculate the secondcolour component predicted values according to the third scalingparameter, the second colour component estimated values and the thirdcolour component reconstructed residuals.

In the embodiments of the disclosure, the prediction apparatus maydetermine the correlation coefficients based on the corresponding firstcolour component neighboring reference values and first colour componentreconstructed values of the current coding block, thereby allocatingdifferent weight coefficients to different neighboring reference samplesaccording to correlations of component parameters between theneighboring reference samples and the current coding block to constructa linear model that is more suitable for the expected model, so as toeffectively overcome the defects that the linear model is deviated fromthe expected model when the first colour component neighboring referencevalues are greatly deviated from corresponding component parameters ofthe current coding block, or, the third colour component neighboringreference values are greatly deviated from the corresponding componentparameters of the current coding block, and greatly improve theprediction accuracy of the video colour component predicted value whenpredicting components of the current coding block according to thelinear model, thereby making the video colour component predicted valuecloser to a real video colour component value.

Embodiment 5

Based on the same inventive concept as Embodiment 1 to Embodiment 4,FIG. 9 is a first schematic structural diagram of a prediction apparatusprovided by an embodiment of the disclosure. The prediction apparatus 1provided by the embodiment of the disclosure may include an acquisitionsection 11, a determination section 12 and a setting section 13.

The acquisition section 11 is configured to acquire a first colourcomponent neighboring reference value and a first colour componentreconstructed value corresponding to a current coding block. The firstcolour component neighboring reference value represents a first colourcomponent parameter corresponding to a neighboring reference sample ofthe current coding block, and the first colour component reconstructedvalue represents one or more reconstructed parameters of the firstcolour component corresponding to the current coding block.

The determination section 12 is configured to determine a correlationcoefficient according to the first colour component neighboringreference value and the first colour component reconstructed value afterthe acquisition section 11 acquires the first colour componentneighboring reference value and first colour component reconstructedvalue corresponding to the current coding block. The correlationcoefficient represents a degree of colour component deviation betweenthe current coding block and the neighboring reference sample.

The acquisition section 11 is further configured to obtain a weightcoefficient corresponding to the neighboring reference sample byinputting the correlation coefficient to a preset weight calculationmodel after the determination section 12 determines the correlationcoefficient according to the first colour component neighboringreference value and the first colour component reconstructed value.

The determination section 12 is further configured to determine, afterthe acquisition section 11 inputs the correlation coefficient to thepreset weight calculation model to obtain the weight coefficientcorresponding to the neighboring reference sample, a scaling factoraccording to the weight coefficient.

The acquisition section 11 is further configured to obtain a secondcolour component predicted value corresponding to the current codingblock based on the scaling factor after the determination section 12determines the scaling factor according to the weight coefficient.

Further, in the embodiment of the disclosure, the determination section12 is specifically configured to perform difference calculation betweenany reference value in the first colour component neighboring referencevalues and each first colour component reconstructed value to obtaincomponent differences corresponding to the any reference value, onefirst colour component neighboring reference value and one first colourcomponent reconstructed value corresponding to one difference, anddetermine a minimum difference in component differences as thecorrelation coefficient.

Further, in the embodiment of the disclosure, the acquisition section 11is further configured to acquire a second colour component neighboringreference value corresponding to the current coding block before thescaling factor is determined according to the weight coefficient. Thesecond colour component neighboring reference value is a second colourcomponent parameter corresponding to the neighboring reference sampleand different from the first colour component parameter.

Further, in the embodiment of the disclosure, the scaling factorincludes a first scaling parameter and a second scaling parameter. Thedetermination section 12 is further specifically configured to input theweight coefficient, the first colour component neighboring referencevalue and the second colour component neighboring reference value to afirst preset factor calculation model to obtain the first scalingparameter, and input the weight coefficient, the first scalingparameter, the first colour component neighboring reference value andthe second colour component neighboring reference value to a secondpreset factor calculation model to obtain the second scaling parameter.

Further, in the embodiment of the disclosure, the acquisition section 11is further configured to acquire a third colour component neighboringreference value and a second colour component neighboring referencevalue corresponding to the current coding block before the scalingfactor is determined according to the weight coefficient. The secondcolour component neighboring reference value and the third colourcomponent neighboring reference value respectively represent a secondcolour component parameter and a third colour component parameter of theneighboring reference sample.

Further, in the embodiment of the disclosure, the acquisition section 11is further configured to acquire a second colour component estimatedvalue and a third colour component reconstructed residual correspondingto the current coding block before obtaining the second colour componentpredicted value of the current coding block based on the scaling factor.The second colour component estimated value is obtained by performingcomponent prediction according to a second colour componentcorresponding to the current coding block, and the third colourcomponent reconstructed residual represents a predicted residualcorresponding to the current coding block.

Further, in the embodiment of the disclosure, the scaling factorincludes a third scaling parameter. The determination section 12 isfurther configured to input the weight coefficient, the second colourcomponent neighboring reference value and the third colour componentneighboring reference value to a third preset factor calculation modelto obtain the third scaling parameter.

Further, in the embodiment of the disclosure, the acquisition section 11is specifically configured to obtain the second colour componentpredicted value according to the first scaling parameter, the secondscaling parameter and the first colour component reconstructed value.

Further, in the embodiment of the disclosure, the acquisition section 11is further specifically configured to obtain the second colour componentpredicted value according to the third scaling parameter, the secondcolour component estimated value and the third colour componentreconstructed residual.

Further, in the embodiment of the disclosure, the setting section 13 isconfigured to set, after the difference calculation is performed betweenany reference value in the first colour component neighboring referencevalues and each first colour component reconstructed value to obtain thecomponent differences corresponding to the any reference value andbefore the scaling factor is determined according to the weightcoefficient, when the component differences corresponding to the anyreference value are greater than a preset difference threshold, a weightcoefficient of the neighboring reference sample corresponding to the anyreference value as zero.

FIG. 10 is a second schematic structural diagram of a predictionapparatus provided by an embodiment of the disclosure. As illustrated inFIG. 10, the prediction apparatus 1 provided by the embodiment of thedisclosure may include a processor 14, a memory 15 storing aninstruction executable by the processor 14, a communication interface16, and a bus 17 used for connecting the processor 14, the memory 15 andthe communication interface 16.

In the embodiment of the disclosure, the processor 14 may be at leastone of an Application Specific Integrated Circuit (ASIC), a DigitalSignal Processor (DSP), a Digital Signal Processing Device (DSPD), aProgrammable Logic Device (PLD), a Field Programmable Gate Array (FPGA),a Central Processing Unit (CPU), a controller, a microcontroller or amicroprocessor. It is to be understood that, for different devices, theelectronic device for implementing functions of the processor mayfurther be another device, which is not specifically defined in theembodiments of the disclosure. The apparatus 1 may further include thememory 15. The memory 15 may be connected to the processor 14. Thememory 15 is configured to store an executable program code including acomputer operation instruction. The memory 15 may include a high-speedRAM memory, and may further include a non-volatile memory such as atleast two disk memories.

In the embodiment of the disclosure, the bus 17 is configured forconnection of the communication interface 16, the processor 14 and thememory 15 as well as mutual communication among these devices.

In the embodiment of the disclosure, the memory 15 is configured tostore instructions and data.

Further, in the embodiment of the disclosure, the processor 14 isconfigured to acquire a first colour component neighboring referencevalue and a first colour component reconstructed value corresponding toa current coding block, the first colour component neighboring referencevalue representing a first colour component parameter corresponding to aneighboring reference sample of the current coding block, and the firstcolour component reconstructed value representing one or morereconstructed parameters of the first colour component corresponding tothe current coding block, determine a correlation coefficient accordingto the first colour component neighboring reference value and the firstcolour component reconstructed value, the correlation coefficientrepresenting a degree of colour component deviation between the currentcoding block and the neighboring reference sample, obtain a weightcoefficient corresponding to the neighboring reference sample byinputting the correlation coefficient to a preset weight calculationmodel, determine a scaling factor according to the weight coefficientand obtain a second colour component predicted value corresponding tothe current coding block based on the scaling factor.

During actual applications, the memory 15 may be a first volatile memorysuch as a first Random-Access Memory (RAM), or a first non-volatilememory such as a first Read-Only Memory (ROM), a first flash memory, aHard Disk Drive (HDD) or a Solid-State Drive (SSD), or a combination ofthe above first memories, and provide instructions and data for theprocessor 14.

In addition, each functional module in the embodiment may be integratedinto a processing unit, each unit may also exist independently, and twoor more than two units may also be integrated into one unit. Theintegrated unit may be implemented in a hardware form and may also beimplemented in form of software function module.

When implemented in form of software function module and sold or usednot as an independent product, the integrated unit may be stored in acomputer-readable storage medium. Based on such an understanding, thetechnical solutions of the embodiment substantially or parts makingcontributions to the related art or all or part of the technicalsolution may be embodied in form of software product, and the computersoftware product is stored in a storage medium, including a plurality ofinstructions configured to enable a computer device (which may be apersonal computer, a server, a network device or the like) or aprocessor to execute all or part of the operations of the method in theembodiments. The foregoing storage medium includes any medium that canstore a program code, such as a U disk, a mobile hard disk, an ROM, anRAM, a magnetic disk, or an optical disc.

According to the apparatus provided by the embodiment of the disclosure,the prediction apparatus may determine the correlation coefficientsbased on the first colour component neighboring reference values andfirst colour component reconstructed values corresponding to the currentcoding block, thereby allocating different weight coefficients todifferent neighboring reference samples according to correlations ofcomponent parameters between the neighboring reference samples and thecurrent coding block to construct a linear model that is more suitablefor the expected model, so as to effectively overcome the defects thatthe linear model is deviated from the expected model when the firstcolour component neighboring reference values are greatly deviated fromcorresponding component parameters of the current coding block, or, thethird colour component neighboring reference values are greatly deviatedfrom the corresponding component parameters of the current coding block,and greatly improve the prediction accuracy of the video colourcomponent predicted value when predicting components of the currentcoding block according to the linear model, thereby making the videocolour component predicted value closer to a real video colour componentvalue.

An embodiment of the disclosure provides a first computer readablestorage medium, which stores a program. The program is executed by aprocessor to implement the method in Embodiment 1 to Embodiment 4.

Specifically, a program instruction corresponding to the method forpredicting a video colour component in the embodiments may be stored onstorage media such as an optical disc, a hard disk and a U disk. Whenthe program instruction corresponding to the method for predicting thevideo colour component in the storage medium is read or executed by anelectronic device, the following operations are included.

A first colour component neighboring reference value and a first colourcomponent reconstructed value corresponding to a current coding blockare acquired. The first colour component neighboring reference valuerepresents a first colour component parameter corresponding to aneighboring reference sample of the current coding block, and the firstcolour component reconstructed value represents one or morereconstructed parameters of the first colour component corresponding tothe current coding block.

A correlation coefficient is determined according to the first colourcomponent neighboring reference value and the first colour componentreconstructed value. The correlation coefficient represents a degree ofcolour component deviation between the current coding block and theneighboring reference sample.

A weight coefficient corresponding to the neighboring reference sampleis obtained by inputting the correlation coefficient to a preset weightcalculation model.

A scaling factor is determined according to the weight coefficient.

A second colour component predicted value corresponding to the currentcoding block is obtained based on the scaling factor.

Those skilled in the art should understand that the embodiments of thepresent disclosure may be provided as a method, a system or a computerprogram product. Thus, the disclosure may adopt forms of hardwareembodiments, software embodiments or embodiments combining software andhardware. Moreover, the disclosure may adopt a form of the computerprogram product implemented on one or more computer available storagemedia (including, but not limited to, a disk memory and an opticalmemory or the like) including computer available program codes.

The disclosure is described with reference to flowcharts and/or blockdiagrams of the method, the device (system) and the computer programproduct according to the embodiments of the disclosure. It should beunderstood that each flow and/or block in the flowcharts and/or theblock diagrams and a combination of the flows and/or the blocks in theflowcharts and/or the block diagrams can be realized by computer programinstructions. These computer program instructions can be provided to ageneral computer, a dedicated computer, an embedded processor orprocessors of other programmable data processing devices to generate amachine, so that an apparatus for realizing functions designated in oneor more flows of the flowcharts and/or one or more blocks of the blockdiagrams is generated via instructions executed by the computer or theprocessor of the other programmable data processing devices.

These computer program instructions may also be stored in a computerreadable memory capable of guiding the computer or the otherprogrammable data processing device to work in a specific mode, so thata manufactured product including an instruction apparatus is generatedvia the instructions stored in the computer readable memory. Theinstruction apparatus achieves the functions designated in one or moreflows of the flowcharts and/or one or more blocks of the block diagrams.

These computer program instructions may also be loaded to the computeror the other programmable data processing device, so that a series ofoperations are executed on the computer or the other programmable deviceto generate computer-implemented processing, and therefore theinstructions executed on the computer or the other programmable deviceprovide a step of realizing the functions designated in one or moreflows of the flowcharts and/or one or more blocks of the block diagrams.

The above are merely preferred embodiments of the disclosure, notintended to limit the protection scope of the disclosure.

INDUSTRIAL APPLICABILITY

According to the method and apparatus for predicting the video colourcomponent and a computer storage medium provided by the embodiments ofthe disclosure, the prediction apparatus may determine the correlationcoefficients based on the first colour component neighboring referencevalues and first colour component reconstructed values corresponding tothe current coding block, thereby allocating different weightcoefficients to different neighboring reference samples according tocorrelations of component parameters between the neighboring referencesamples and the current coding block to construct a linear model that ismore suitable for the expected model, so as to effectively overcome thedefects that the linear model is deviated from the expected model whenthe first colour component neighboring reference values are greatlydeviated from corresponding component parameters of the current codingblock, or, the third colour component neighboring reference values aregreatly deviated from the corresponding component parameters of thecurrent coding block, and greatly improve the prediction accuracy of thevideo colour component predicted value when predicting components of thecurrent coding block according to the linear model, thereby making thevideo colour component predicted value closer to a real video colourcomponent value.

The invention claimed is:
 1. A method for predicting a video colourcomponent, applied to a decoder and comprising: acquiring a first colourcomponent neighboring reference value and a first colour componentreconstructed value corresponding to a current block, wherein the firstcolour component neighboring reference value represents a first colourcomponent parameter corresponding to a neighboring reference sample ofthe current block, and the first colour component reconstructed valuerepresents one or more reconstructed parameters of a first colourcomponent corresponding to the current block; determining a weightcoefficient corresponding to the neighboring reference sample, whereinthe weight coefficient is determined according to position of thecurrent block and the neighboring reference sample; determining ascaling factor according to the weight coefficient and the first colourcomponent neighboring reference value; and obtaining a second colourcomponent predicted value corresponding to the current block based on alinear model corresponding to the scaling factor.
 2. The method of claim1, wherein the position represents a position correlation between thecurrent block and the neighboring reference sample.
 3. The method ofclaim 1, before determining the scaling factor according to the weightcoefficient and the first colour component neighboring reference value,further comprising: acquiring a second colour component neighboringreference value corresponding to the current block, the second colourcomponent neighboring reference value being a second colour componentparameter corresponding to the neighboring reference sample anddifferent from the first colour component parameter.
 4. The method ofclaim 3, wherein determining the scaling factor according to the weightcoefficient and the first colour component neighboring reference valuecomprises: inputting the weight coefficient, the first colour componentneighboring reference value and the second colour component neighboringreference value to a preset factor calculation model to obtain thescaling factor; and obtaining the second colour component predictedvalue corresponding to the current block based on the linear modelcorresponding to the scaling factor comprises: obtaining the secondcolour component predicted value based on the linear model correspondingto the scaling factor and the first colour component reconstructedvalue.
 5. The method of claim 3, before obtaining the second colourcomponent predicted value corresponding to the current block based onthe linear model corresponding to the scaling factor, furthercomprising: acquiring a second colour component estimated valuecorresponding to the current block, wherein the second colour componentestimated value is obtained by performing component prediction accordingto a second colour component corresponding to the current block.
 6. Themethod of claim 1, further comprising: setting weight coefficients ofpart of reference samples corresponding to part of neighboring referencevalues as zero, wherein position correlations between the current blockand the part of reference samples do not meet a preset threshold; or,removing part of reference samples from the neighboring referencesamples, wherein position correlations between the current block and thepart of reference samples do not meet a preset threshold; or, performingscreening on the neighboring reference samples.
 7. The method of claim6, wherein performing screening on the neighboring reference samplescomprises: performing downsampling on the neighboring reference samplesto determine part of reference samples.
 8. The method of claim 1,wherein neighboring reference samples comprise at least one of an upperreference sample of the current block, an upper-left reference sample ofthe current block or a left reference sample of the current block; andthe neighboring reference samples further comprise at least one of anupper-right reference sample of the current block or a bottom-leftreference sample of the current block.
 9. A decoder, comprising aprocessor, a memory storing an instruction executable by the processor,wherein the instruction is executed by the processor to implement amethod for predicting a video colour component, comprising: acquiring afirst colour component neighboring reference value and a first colourcomponent reconstructed value corresponding to a current block, whereinthe first colour component neighboring reference value represents afirst colour component parameter corresponding to a neighboringreference sample of the current block, and the first colour componentreconstructed value represents one or more reconstructed parameters of afirst colour component corresponding to the current block; determining aweight coefficient corresponding to the neighboring reference sample,wherein the weight coefficient is determined according to positionbetween the current block and the neighboring reference sample;determining a scaling factor according to the weight coefficient and thefirst colour component neighboring reference value; and obtaining asecond colour component predicted value corresponding to the currentblock based on a linear model corresponding to the scaling factor. 10.The decoder of claim 9, wherein the position represents a positioncorrelation between the current block and the neighboring referencesample.
 11. The decoder of claim 9, wherein the processor is configuredto, before determining the scaling factor according to the weightcoefficient and the first colour component neighboring reference value,acquire a second colour component neighboring reference valuecorresponding to the current block, the second colour componentneighboring reference value being a second colour component parametercorresponding to the neighboring reference sample and different from thefirst colour component parameter.
 12. The decoder of claim 11, whereinthe processor is configured to: input the weight coefficient, the firstcolour component neighboring reference value and the second colourcomponent neighboring reference value to a preset factor calculationmodel to obtain the scaling factor; and the processor is furtherconfigured to obtain the second colour component predicted value basedon the linear model corresponding to the scaling factor and the firstcolour component reconstructed value.
 13. The decoder of claim 11,wherein the processor is configured to, before obtaining the secondcolour component predicted value corresponding to the current blockbased on the linear model corresponding to the scaling factor, acquire asecond colour component estimated value corresponding to the currentblock, wherein the second colour component estimated value is obtainedby performing component prediction according to a second colourcomponent corresponding to the current block.
 14. The decoder of claim9, wherein the processor is configured to: set weight coefficients ofpart of reference samples corresponding to part of neighboring referencevalues as zero, wherein position correlations between the current blockand the part of reference samples do not meet a preset threshold; or,remove part of reference samples from the neighboring reference samples,wherein position correlations between the current block and the part ofreference samples do not meet a preset threshold; or, perform screeningon the neighboring reference samples.
 15. The decoder of claim 14,wherein the processor is configured to: perform downsampling on theneighboring reference samples to determine part of reference samples.16. The decoder of claim 9, wherein neighboring reference samplescomprise at least one of an upper reference sample of the current block,an upper-left reference sample of the current block or a left referencesample of the current block; and the neighboring reference samplesfurther comprise at least one of an upper-right reference sample of thecurrent block or a bottom-left reference sample of the current block.17. A method for predicting a video colour component, applied to anencoder and comprising: acquiring a first colour component neighboringreference value and a first colour component reconstructed valuecorresponding to a current coding block, wherein the first colourcomponent neighboring reference value represents a first colourcomponent parameter corresponding to a neighboring reference sample ofthe current coding block, and the first colour component reconstructedvalue represents one or more reconstructed parameters of a first colourcomponent corresponding to the current coding block; determining aweight coefficient corresponding to the neighboring reference sample,wherein the weight coefficient is determined according to positionbetween the current block and the neighboring reference sample;determining a scaling factor according to the weight coefficient and thefirst colour component neighboring reference value; and obtaining asecond colour component predicted value corresponding to the currentcoding block based on a linear model corresponding to the scalingfactor.
 18. The method of claim 17, wherein the position represents aposition correlation between the current coding block and theneighboring reference sample.
 19. The method of claim 17, beforedetermining the scaling factor according to the weight coefficient andthe first colour component neighboring reference value, furthercomprising: acquiring a second colour component neighboring referencevalue corresponding to the current coding block, the second colourcomponent neighboring reference value being a second colour componentparameter corresponding to the neighboring reference sample anddifferent from the first colour component parameter.
 20. The method ofclaim 19, wherein the first colour component neighboring reference valueand the first colour component reconstructed value corresponding to thecurrent coding block comprise at least two groups of first colourcomponent neighboring reference values and first colour componentreconstructed values, the method further comprises: determining weightcoefficients for each group of first colour component neighboringreference values and first colour component reconstructed values;inputting the weight coefficients, the first colour componentneighboring reference values and the second colour component neighboringreference values to the preset factor calculation model to obtain atleast two groups of scaling factors corresponding to the at least twogroups of first colour component neighboring reference values and firstcolour component reconstructed values; and selecting one group ofscaling factors from the at least two groups of scaling factors.
 21. Themethod of claim 17, wherein obtaining the second colour componentpredicted value corresponding to the current coding block based on thelinear model corresponding to the scaling factor comprises: obtainingthe second colour component predicted value based on the linear modelcorresponding to the scaling factor and the first colour componentreconstructed value.
 22. The method of claim 17, further comprising:setting weight coefficients of part of reference samples correspondingto part of neighboring reference values as zero, wherein positioncorrelations between the current coding block and the part of referencesamples do not meet a preset threshold; or, removing part of referencesamples from the neighboring reference samples, wherein positioncorrelations between the current coding block and the part of referencesamples do not meet a preset threshold; or performing screening on theneighboring reference samples.
 23. The method of claim 17, whereinneighboring reference samples comprise at least one of an upperreference sample of the current coding block, an upper-left referencesample of the current coding block or a left reference sample of thecurrent coding block; and the neighboring reference samples furthercomprise at least one of an upper-right reference sample of the currentcoding block or a bottom-left reference sample of the current codingblock.
 24. An encoder, comprising a processor, a memory storing aninstruction executable by the processor, wherein the instruction isexecuted by the processor to implement a method for predicting a videocolour component, comprising: acquiring a first colour componentneighboring reference value and a first colour component reconstructedvalue corresponding to a current coding block, wherein the first colourcomponent neighboring reference value represents a first colourcomponent parameter corresponding to a neighboring reference sample ofthe current coding block, and the first colour component reconstructedvalue represents one or more reconstructed parameters of a first colourcomponent corresponding to the current coding block; determining aweight coefficient corresponding to the neighboring reference sample,wherein the weight coefficient is determined according to positionbetween the current block and the neighboring reference sample;determining a scaling factor according to the weight coefficient and thefirst colour component neighboring reference value; and obtaining asecond colour component predicted value corresponding to the currentcoding block based on a linear model corresponding to the scalingfactor.
 25. The encoder of claim 24, wherein the position represents aposition correlation between the current coding block and theneighboring reference sample.
 26. The encoder of claim 24, wherein theprocessor is configured to, before determining the scaling factoraccording to the weight coefficient and the first colour componentneighboring reference value, acquire a second colour componentneighboring reference value corresponding to the current coding block,the second colour component neighboring reference value being a secondcolour component parameter corresponding to the neighboring referencesample and different from the first colour component parameter.
 27. Theencoder of claim 26, wherein the first colour component neighboringreference value and the first colour component reconstructed valuecorresponding to the current coding block comprise at least two groupsof first colour component neighboring reference values and first colourcomponent reconstructed values, the processor is configured to:determine weight coefficients for each group of first colour componentneighboring reference values and first colour component reconstructedvalues; input the weight coefficients, the first colour componentneighboring reference values and the second colour component neighboringreference values to the preset factor calculation model to obtain atleast two groups of scaling factors corresponding to the at least twogroups of first colour component neighboring reference values and firstcolour component reconstructed values; and select one group of scalingfactors from the at least two groups of scaling factors.
 28. The encoderof claim 24, wherein the processor is configured to: obtain the secondcolour component predicted value based on the linear model correspondingto the scaling factor and the first colour component reconstructedvalue.
 29. The encoder of claim 24, wherein the processor is configuredto: set weight coefficients of part of reference samples correspondingto part of neighboring reference values as zero, wherein positioncorrelations between the current coding block and the part of referencesamples do not meet a preset threshold; or, remove part of referencesamples from the neighboring reference samples, wherein positioncorrelations between the current coding block and the part of referencesamples do not meet a preset threshold; or perform screening on theneighboring reference samples.
 30. The encoder of claim 24, whereinneighboring reference samples comprise at least one of an upperreference sample of the current coding block, an upper-left referencesample of the current coding block or a left reference sample of thecurrent coding block; and the neighboring reference samples furthercomprise at least one of an upper-right reference sample of the currentcoding block or a bottom-left reference sample of the current codingblock.